2020/11/25

Exercise

Create a presentation about any topic you like that consists of at least 7 slides and includes all of the following:

  • a logo
  • a centered still figure
  • an interactive table
  • a moving figure, interactive figure or movie
  • a 2-column slide
  • an aligned multi-row equation
  • a citation and reference list
  • r-code, displayed but not executed
  • cached r-code (may overlap with the next requirement)
  • r-code, executed, but not displayed (e.g. a figure generation)

library general packages

library(dplyr) 
library(magrittr)
library(DT)
library(bain)
library(plotly)
library(threejs)

A logo

A centered still figure

<center>
![](https://logoeps.com/wp-content/uploads/2014/07/Google_logo_Sept-Oct_1998.png)
</center>

An interactive table

sesamesim[,4:9] %>% 
  datatable(options = list(pageLength = 7))

A interactive figure

p <- ggplot(data = diamonds, aes(x = cut, fill = clarity)) +
  geom_bar(position = "dodge")
ggplotly(p)

An interactive table warning = FALSE

library(xtable)
dat <- sesamesim[1:3,10:15] %>% head
xtable(dat)
## % latex table generated in R 4.0.2 by xtable 1.8-4 package
## % Tue Dec 08 23:53:55 2020
## \begin{table}[ht]
## \centering
## \begin{tabular}{rrrrrrr}
##   \hline
##  & Bb & Bl & Bf & Bn & Br & Bc \\ 
##   \hline
## 1 &  10 &  16 &   3 &  18 &   7 &   8 \\ 
##   2 &   8 &   7 &   2 &   7 &   7 &   4 \\ 
##   3 &  21 &   4 &  11 &  21 &   9 &   9 \\ 
##    \hline
## \end{tabular}
## \end{table}

A 2-column slide

Markup Languages and Reproducible Programming in Statistics :::::: {.cols data-latex=""}

This course gives an overview of the state-of-the-art in statistical markup, reproducible programming and scientific digital representation. Students will get to know the professional field of statistical markup and its innovations and challenges.

The students get acquainted with different viewpoints on marking up statistical manuscripts, areas of innovation, and challenges that people face when working with, analysing and reporting (simulated) data. Knowledge obtained from this course will help students face multidimensional problems during their professional career.

::::::

An aligned multi-row equation

BF_{N} = \frac{\mathcal{N}(\mu=0 | \overline{y}, \frac{s^2}{N})}{\mathcal{N}(\mu=0 | 0, \frac{1}{b}\frac{s^2}{N})}

where $\overline{y}$ and $s^2$ denote the sample mean and the unbiased sample variance, respectively

A citation and reference list

\begin{description}
\item Cohen, J. (1992). A power primer. \emph{Psychological Bulletin, 112}, 155-159.
http://dx.doi.org/10.1037/0033-2909.112.1.155
\item Cohen, J. (1994). The earth is round, p<.05. \emph{American Psychologist, 49}, 997-1003.
http://dx.doi.org/10.1037/0003-066X.49.12.997
\item Gilks, W.R. (1995). Discussion of fractional Bayes factors for model comparison (by
O'Hagan). \emph{Journal of the Royal Statistical Society Series B, 56,} 118-120.
http://www.jstor.org/stable/2346088

r-code, displayed but not executed

library(dygraphs)
dygraph(nhtemp, main = "New Haven Temperatures") %>% 
  dyRangeSelector(dateWindow = c("1920-01-01", "1960-01-01"))

Cached r-code

samples <- plyr::rlply(100, rnorm(5000, mean = 0, sd = 1))

r-code, executed, but not displayed (e.g. a figure generation)